package com.bflow.api.bo;

import com.bflow.api.bo.ext.BflowUserBo;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
* 功能：BflowRunTask 任务-BO(business object)业务对象
* 作者：haowen
* 日期：2018-12-13
*/
public class BflowRunTaskAuditBo implements Serializable {

   private static final long serialVersionUID = -622229976534939493L;

	//任务ID
	private String taskId;

	//操作人ID
	private String operationUserId;
	//操作人名称
	private String operationUserName;

	/** 路由id */
	private String routeId;
	/** 结论 */
	private String routeText;
	/** 备注 */
	private String remarks;
	/** 扩展JSON */
	private String extJson;

	//扩展 参数
	private Map<String, String> vars;

	//设置 操作信息
	public void setOperInfo(BflowUserBo userBo){
		if (userBo != null){
			setOperationUserId(userBo.getUserId());
			setOperationUserName(userBo.getUserName());
		}
	}

	public BflowRunTaskAuditBo() {
	}

	public BflowRunTaskAuditBo(String operationUserId, String operationUserName) {
		this.operationUserId = operationUserId;
		this.operationUserName = operationUserName;
	}

	public BflowRunTaskAuditBo(String taskId, BflowUserBo userBo) {
		this.taskId = taskId;
		setOperInfo(userBo);
	}


	public String getTaskId() {
		return this.taskId;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}

	public String getOperationUserId() {
		return this.operationUserId;
	}

	public void setOperationUserId(String operationUserId) {
		this.operationUserId = operationUserId;
	}

	public String getOperationUserName() {
		return this.operationUserName;
	}

	public void setOperationUserName(String operationUserName) {
		this.operationUserName = operationUserName;
	}


	public String getRouteId() {
		return routeId;
	}
	public void setRouteId(String routeId) {
		this.routeId = routeId;
	}

	public String getRouteText() {
		return routeText;
	}
	public void setRouteText(String routeText) {
		this.routeText = routeText;
	}

	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getExtJson() {
		return this.extJson;
	}

	public void setExtJson(String extJson) {
		this.extJson = extJson;
	}

	public Map<String, String> getVars() {
		return vars;
	}

	public void addVals(String paramName, String paramVal) {
		if(vars == null)
			vars = new HashMap<>(8);
		vars.put(paramName, paramVal);
	}

	public String getVal(String paramName) {
		if(vars == null)
			return null;
		return vars.get(paramName);
	}
}

